#include "../apue.h"
#include <time.h>
#include <limits.h>

#define FTIME_MAX 80

int main(void)
{
    time_t t;
    struct tm * tmp;
    char tbuf[FTIME_MAX];

    //t = ((time_t)1 << 50) - 1;
    t = ((time_t)1 << 32) - 1;

    printf("t:%ld, UINT_MAX:%u, eq: %d\n", t, UINT_MAX, t == UINT_MAX);

    tmp = localtime(&t);
    if (strftime(tbuf, FTIME_MAX, "%Y %m %d %a %R:%S %Z", tmp) == 0)
        err_sys("strftime failed");
    else
        printf("%s\n", tbuf);

    _exit;

    return 0;
}
